home *** CD-ROM | disk | FTP | other *** search
- head 1.3;
- access;
- symbols
- VER_0_3:1.3
- VER_0_2:1.2;
- locks; strict;
- comment @# @;
-
-
- 1.3
- date 95.03.24.11.43.35; author coulter; state Exp;
- branches;
- next 1.2;
-
- 1.2
- date 95.02.19.16.06.41; author coulter; state Exp;
- branches;
- next 1.1;
-
- 1.1
- date 95.02.18.08.36.38; author coulter; state Exp;
- branches;
- next ;
-
-
- desc
- @search for a path to a directory
- @
-
-
- 1.3
- log
- @Checkin version for 0.3 distribution.
- @
- text
- @#! /bin/ksh
- USAGE='USAGE: search_cd cd_links
- cd_links is a file with file_path 2 tabs and a link value.
- listing all the link files on the CD and the link value.
-
- Find out how we can get to
- /mnt/system_cd/usr/packages/interviews/bin
- through a link. Look for a link to a file below bin or to
- bin itself.
- '
- # (C) Copyright 1995 by Michael Coulter. All rights reserved.
-
- # SEARCH_DIR='/mnt/system_cd/usr/packages'
- #SEARCH_DIR='/mnt/system_cd/usr/lib/smail'
- #SEARCH_DIR='/mnt/system_cd/usr/X11R6/lib/X11'
- SEARCH_DIR='/system_cd/usr/lib/emacs'
-
- # Process parameters
-
- CD_LINK="$1" ; shift
-
- # Do it
-
- set -P # print absolut hw path
- cat "$CD_LINK" | while read FILE LINK REST
- do
- # echo "search_cd: $FILE $LINK"
- if [ -d "$FILE" ]
- then
- cd "$FILE"
- else
- cd $(dirname "$FILE")
- cd $(dirname "$LINK") 2> /dev/null
- fi
- # echo "search_cd: dir is $PWD"
- if [ "$PWD" != "${PWD#$SEARCH_DIR}" ]
- then
- echo "$FILE with link $LINK is a problem"
- fi
- done
- exit 0
- @
-
-
- 1.2
- log
- @Checkpoint version 0.1
- @
- text
- @d11 1
- @
-
-
- 1.1
- log
- @Checkpoint version before fixing /usr/bin install
- @
- text
- @d12 4
- a15 1
- SEARCH_DIR='/mnt/system_cd/usr/packages'
- @
-